<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>STRATEGIC CONSTRUCTION:  Fichier source de /Users/pierre-loupbarazzutti/Desktop/svn/silverstarlif7/projet/src/Unite.h</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">STRATEGIC CONSTRUCTION
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Généré par Doxygen 1.8.0 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li><a href="dirs.html"><span>Répertoires</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Membres&#160;de&#160;fichier</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_unite_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Unite.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_unite_8h.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _UNITE</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _UNITE</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a><a class="code" href="structs_unite.html">00004</a> <span class="keyword">struct </span><a class="code" href="structs_unite.html">sUnite</a>
<a name="l00005"></a>00005 {
<a name="l00006"></a><a class="code" href="structs_unite.html#a3fe780d6eaa46254171f89562f9c56ce">00006</a>         <span class="keywordtype">int</span> <a class="code" href="structs_unite.html#a3fe780d6eaa46254171f89562f9c56ce">type</a>;
<a name="l00007"></a><a class="code" href="structs_unite.html#a74c0ff56320445190cd8751323616c50">00007</a>         <span class="keywordtype">int</span> <a class="code" href="structs_unite.html#a74c0ff56320445190cd8751323616c50">vie</a>;
<a name="l00008"></a><a class="code" href="structs_unite.html#ae7483539717b3a6ae115bd5b4c64da2f">00008</a>         <span class="keywordtype">float</span> <a class="code" href="structs_unite.html#ae7483539717b3a6ae115bd5b4c64da2f">attaque</a>;
<a name="l00009"></a><a class="code" href="structs_unite.html#a293e341964051350e6d43b0ab5517f5e">00009</a>         <span class="keywordtype">float</span> <a class="code" href="structs_unite.html#a293e341964051350e6d43b0ab5517f5e">defense</a>;
<a name="l00010"></a><a class="code" href="structs_unite.html#a2120f17ed7f02f70b2d0cd523b918c7a">00010</a>         <span class="keywordtype">int</span> <a class="code" href="structs_unite.html#a2120f17ed7f02f70b2d0cd523b918c7a">deplacement</a>;
<a name="l00011"></a><a class="code" href="structs_unite.html#a854606718cd16b8f18bff4c55de82807">00011</a>         <span class="keywordtype">int</span> <a class="code" href="structs_unite.html#a854606718cd16b8f18bff4c55de82807">equipe</a>;
<a name="l00012"></a><a class="code" href="structs_unite.html#a29b3eda4f38ebd4123d8929f13798b3c">00012</a>         <span class="keywordtype">int</span> <a class="code" href="structs_unite.html#a29b3eda4f38ebd4123d8929f13798b3c">utilise</a>;
<a name="l00013"></a>00013 };
<a name="l00014"></a><a class="code" href="_unite_8h.html#a8f9d2f420b0eaf95404a313a37e410e7">00014</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structs_unite.html">sUnite</a> <a class="code" href="structs_unite.html">Unite</a>;
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 <span class="comment">/* Procédure InitialisationUnite : </span>
<a name="l00017"></a>00017 <span class="comment">Précondition : l&#39;unité u doit être créée.</span>
<a name="l00018"></a>00018 <span class="comment">Postcondition : initialisation d&#39;unite selon le type et selon son equipe </span>
<a name="l00019"></a>00019 <span class="comment">Paramètres en mode donnée : type, equipe</span>
<a name="l00020"></a>00020 <span class="comment">Paramètres en mode donnée-résultat : u */</span>
<a name="l00021"></a>00021 <span class="keywordtype">void</span> <a class="code" href="_unite_8c.html#a513f9afaf118a3c62f342145d7d4b876">InitialisationUnite</a> (<a class="code" href="structs_unite.html">Unite</a> * u,<span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="structs_unite.html#a3fe780d6eaa46254171f89562f9c56ce">type</a> ,<span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="structs_unite.html#a854606718cd16b8f18bff4c55de82807">equipe</a>);
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="comment">/* Procédure DestructionUnite : </span>
<a name="l00025"></a>00025 <span class="comment">Précondition : u doit être correctement initialisé.</span>
<a name="l00026"></a>00026 <span class="comment">Postcondition : remet toutes les valeurs de la structure Unite à 0 </span>
<a name="l00027"></a>00027 <span class="comment">Paramètre en mode donnée-résultat : */</span>
<a name="l00028"></a>00028 <span class="keywordtype">void</span> <a class="code" href="_unite_8c.html#a2df5f84d40b0cfdc35a2e9e780f59429">DestructionUnite</a>(<a class="code" href="structs_unite.html">Unite</a> * u);
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="comment">/* Procédure : ModifierUtiliseUnite </span>
<a name="l00032"></a>00032 <span class="comment">Précondition :  - u correctement initialisé</span>
<a name="l00033"></a>00033 <span class="comment">                - utilise est égal à 0 si l&#39;unite peut être utilisé et à 1 si elle ne peut plus bouger avant le prochain tour. </span>
<a name="l00034"></a>00034 <span class="comment">Postcondition: change le champ &quot;utilise&quot; lorsqu&#39;un personnage est utilisé ou peut de nouveau se déplacer</span>
<a name="l00035"></a>00035 <span class="comment">Paramètre en mode donnée-résultat : u</span>
<a name="l00036"></a>00036 <span class="comment">Paramètre en mode donnée : utilise */</span>
<a name="l00037"></a>00037 <span class="keywordtype">void</span> <a class="code" href="_unite_8c.html#a1bd5d8c5bd17393555871d8671e3c080">ModifierUtiliseUnite</a> (<a class="code" href="structs_unite.html">Unite</a> * u, <span class="keywordtype">int</span> <a class="code" href="structs_unite.html#a29b3eda4f38ebd4123d8929f13798b3c">utilise</a>);
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 <span class="comment">/*Fonction CombatUnite -&gt; entier</span>
<a name="l00041"></a>00041 <span class="comment">Précondition : - u1 et u2 correctement initialisés</span>
<a name="l00042"></a>00042 <span class="comment">               - u1 est l&#39;unité qui attaque la première.</span>
<a name="l00043"></a>00043 <span class="comment">Postcondition: -  fait un combat entre l&#39;unité 1 et l&#39;unité 2 : </span>
<a name="l00044"></a>00044 <span class="comment">                  renvoie 0 si les deux unités sont en vie</span>
<a name="l00045"></a>00045 <span class="comment">                  renvoie 1 si l&#39;unité 2 n&#39;a plus de vie (et n&#39;enlève pas la vie de l&#39;unite1).</span>
<a name="l00046"></a>00046 <span class="comment">                  renvoie 2 si l&#39;unité 1 n&#39;a plus de vie </span>
<a name="l00047"></a>00047 <span class="comment">Paramètre en mode donnée-résultats : u1, u2 */</span>
<a name="l00048"></a>00048 <span class="keywordtype">int</span> <a class="code" href="_unite_8c.html#a9d049eae54ca03f0cffb6ba92cb2f468">CombatUnite</a> (<a class="code" href="structs_unite.html">Unite</a> * u1, <a class="code" href="structs_unite.html">Unite</a> * u2);
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 <span class="comment">/*Procédure UniteTestRegression </span>
<a name="l00052"></a>00052 <span class="comment">Précondition : aucune</span>
<a name="l00053"></a>00053 <span class="comment">Postcondition : teste toutes les fonctions et procédures du module Unite */</span>
<a name="l00054"></a>00054 <span class="keywordtype">void</span> <a class="code" href="_unite_8c.html#acb543d02e600f174b7914ebf72361922">UniteTestRegression</a>();
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_unite_8h.html">Unite.h</a>      </li>

    <li class="footer">Généré le Jeudi Juin 7 2012 11:43:12 pour STRATEGIC CONSTRUCTION par
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.0 </li>
   </ul>
 </div>


</body>
</html>
